<?

/*	Header TEMPLATE (default)
*	
*	renders the by default needed header elements.
*
*	Paramaters: module ids array 
*	
*
*					*/
global $Page, $Object;


if( count( $template_param )) $mods = "?mods=" . implode( ",", $template_param );

function header_check_IE() {
	if( IE ) {
		$header  = '<meta http-equiv="X-UA-Compatible" content="IE=edge">';
		$header  .= "<script src='http://central.onedotonly.be/js/AC_RunActiveContent.js' type='text/javascript'></script>";
		$header .= "<!--[if lt IE " . ( engine_get( "dangerbar" )? 8: 7 ) . "]><script src='http://central.onedotonly.be/js/dangerbar.js' type='text/javascript'></script>\n<![endif]-->";

	} else $header = "<meta http-equiv='X-UA-Compatible' content='chrome=8'>";
	
	return $header;
}

if( $Page->hasMeta() || $Object )
	$meta_description = $Page->hasMeta()? $Page->meta() : $Object->get( "name" ) . " - " . strip_tags( $Object->get( "content" ));
	
if( $Object ) {

	$meta_keywords[] = $Object->get( "name" );
	if( $Object->tags && $tags = $Object->tags->filter())
		foreach( $tags as $Tag )
			$meta_keywords[] = $Tag->get( "name" );
}
?>
	
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta charset="utf-8" />
	<?= header_check_IE() ?>
	<?	if( $meta_description )	echo "<meta name='description' content='$meta_description' />";
		if( $meta_keywords )	echo "<meta name='keywords' content='" . implode( ",", $meta_keywords ) . "' />";
	?>
	<link rel='icon' href='<?=THEME?>icon.png' />
	<?= ( $mods )? "<link rel='stylesheet' href='/style.mod$mods' type='text/css' media='screen,print' />" : "" ?>
	<link rel='stylesheet' href='<?=THEME?>root.css' type='text/css' media='screen,print' />
	<link rel='stylesheet' href='<?=THEME?>modules.css' type='text/css' media='screen,print' />
	<link rel='stylesheet' href='http://central.onedotonly.be/style/form/form.css' type='text/css' media='screen,print' />
	<link rel='stylesheet' href='http://central.onedotonly.be/style/print.css' type='text/css' media='print' />
	<link rel='alternate' type='application/rss+xml' title='RSS' href='/atom.rss'>
	<script src='http://central.onedotonly.be/js/prototype.js' type='text/javascript'></script>
	<script src='http://central.onedotonly.be/js/scr.l/scriptaculous.js?load=effects' type='text/javascript'></script>
	<script src='http://central.onedotonly.be/js/xhttp.js' type='text/javascript'></script>
	<?= ( $mods )? "<script src='/script.mod$mods' type='text/javascript'></script>" : "" ?>
	
	<script type='text/javascript'>
		var init = {
			url			: '<?= engine_get('url') ?>',
			ext			: '<?= engine_get('mail.ext') ?>',
			theme		: '<?= THEME ?>',
			page		: '<?= PAGE ?>'
		}
	</script>